package com.example.cloud.consume.order.feign.controller;

import com.example.cloud.consume.order.feign.service.PaymentFeignService;
import com.example.cloud.entities.entity.Payment;
import com.example.cloud.entities.utils.SimpleMessage;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 订单控制器
 *
 * @author Frank
 * @create 2020-11-30 16:12
 **/
@RestController
@Slf4j
public class OrderFeignController {
    @Resource
    private PaymentFeignService paymentFeignService;

    /**
     * 查询详情
     * @param id 主键id
     * @return
     */
    @ApiOperation("查询详情")
    @RequestMapping(value = "/{id}" , method = RequestMethod.GET)
    public SimpleMessage<Payment> findOne(@PathVariable long id) {
        return paymentFeignService.findOne(id);
    }
}
